package com.zengyan.gd.model;


import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;

import lombok.Data;

/**
 * CREATE TABLE `sign_up` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '报名id',
 `student_num` varchar(64) NOT NULL COMMENT '学号',
 `event_id` int(11) NOT NULL COMMENT '活动id',
 `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
 `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
 PRIMARY KEY (`id`),
 KEY `uqe_sign_up_id` (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 *
 *
 */
@Entity(name = "sign_up")
@Data
public class SignUp {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private String id;

    @Column(name = "student_num")
    @NotEmpty(message = "学生id 必填")
    private String stuNum;

    @Column(name = "event_id")
    @NotNull(message = "活动id 必填")
    private int eventId; //活动id


}
